package cn.k.domain;

import com.alibaba.fastjson.JSON;
import lombok.Getter;
import lombok.Setter;

import java.util.ArrayList;
import java.util.List;

@Getter
@Setter
public class SystemDictionary {
    private Long id;
    private String name;
    private String sn;
    private String intro;
    private Long parentId;
    private String parentName;

    //定义儿子属性(数据字典明细)
    List<SystemDictionary> children =new ArrayList<>();

    public String toJson(){
        //将对象转成JSON字符串格式
        return JSON.toJSONString(this);
    }

}